class_name mapping_util

static func obj_to_dic(obj:Object) ->Dictionary:
	var pros :Array = obj.get_property_list()
	var dic :Dictionary =  Dictionary()
	for pro in pros:
		match pro["type"]:
			Variant.Type.TYPE_INT:
				dic[pro["name"]] = obj.get(pro["name"])
			Variant.Type.TYPE_FLOAT:
				dic[pro["name"]] = obj.get(pro["name"])
			Variant.Type.TYPE_STRING:
				dic[pro["name"]] = obj.get(pro["name"])
			Variant.Type.TYPE_STRING_NAME:
				dic[pro["name"]] = obj.get(pro["name"])
			_ :
				pass
	return dic
	
	
	
	
	
	
	
	
	
	
